import './top.css'
import Myecharts from '../../../common/myecharts/myecharts';
import { useEffect, useState } from 'react';
import { getquixiang } from '../../../../request/index';

const Top = () => {
    let [option, setoption] = useState({
        title: {
            text: 'World Population'
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        legend: {},
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: 'value',
            boundaryGap: [0, 0.01]
        },
        yAxis: {
            type: 'category',
            data: ['Brazil', 'Indonesia', 'USA', 'India', 'China', 'World']
        },
        series: [
            {
                name: '2011',
                type: 'bar',
                data: [18203, 23489, 29034, 104970, 131744, 630230]
            },
            {
                name: '2012',
                type: 'bar',
                data: [19325, 23438, 31000, 121594, 134141, 681807]
            }
        ]
    });

    useEffect(() => {
       
        getquixiang().then(res=>{
            console.log(res,999) 

            setoption(option)
        })

    }, [])

    return (
        <div className='qqltop'>
            <div className='ltit'>
                近三年来毕业人员去向
            </div>
            <div className='ltu'>
                <Myecharts option={option}></Myecharts>
            </div>
        </div>
    )
}
export default Top;